﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Linq.Expressions;

namespace ComApp.Model
{
    public class UserInfo: INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;

        protected void InvokePropertyChanged<T, TProperty>(Expression<Func<T, TProperty>> expression)
        {
            if (this.PropertyChanged != null)
            {
                var propertyName = PropertyLambda.For(expression);
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        private Guid id;
        public Guid ID
        {
            get
            {
                return this.id;
            }
            set
            {
                this.id = value;
                this.InvokePropertyChanged<UserInfo, Guid>(i => i.ID);
            }
        }

        private string userCode;
        public string UserCode
        {
            get
            {
                return this.userCode;
            }
            set
            {
                this.userCode = value;
                this.InvokePropertyChanged<UserInfo, string>(i => i.UserCode);
            }
        }


        private string userName;
        public string UserName
        {
            get
            {
                return this.userName;
            }
            set
            {
                this.userName = value;
                this.InvokePropertyChanged<UserInfo, string>(i => i.UserName);
            }
        }


        private string userSex;
        public string UserSex
        {
            get
            {
                return this.userSex;
            }
            set
            {
                this.userSex = value;
                this.InvokePropertyChanged<UserInfo, string>(i => i.UserSex);
            }
        }


        private string userPic;
        public string UserPic
        {
            get
            {
                return this.userPic;
            }
            set
            {
                this.userPic = value;
                this.InvokePropertyChanged<UserInfo, string>(i => i.UserPic);
            }
        }


        private string userOldYear;
        public string UserOldYear
        {
            get
            {
                return this.userOldYear;
            }
            set
            {
                this.userOldYear = value;
                this.InvokePropertyChanged<UserInfo, string>(i => i.UserOldYear);
            }
        }

        private string userCity;
        public string UserCity
        {
            get
            {
                return this.userCity;
            }
            set
            {
                this.userCity = value;
                this.InvokePropertyChanged<UserInfo, string>(i => i.UserCity);
            }
        }

        private string userEmail;
        public string UserEmail
        {
            get
            {
                return this.userEmail;
            }
            set
            {
                this.userEmail = value;
                this.InvokePropertyChanged<UserInfo, string>(i => i.UserEmail);
            }
        }

        private string userSign;
        public string UserSign
        {
            get
            {
                return this.userSign;
            }
            set
            {
                this.userSign = value;
                this.InvokePropertyChanged<UserInfo, string>(i => i.UserSign);
            }
        }


    }

 
}
